/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_';
import type { BaseResponse_ChartsListVO_ } from '../models/BaseResponse_ChartsListVO_';
import type { BaseResponse_CompetitionQuestionDetailVO_ } from '../models/BaseResponse_CompetitionQuestionDetailVO_';
import type { BaseResponse_CompetitionQuestionsVO_ } from '../models/BaseResponse_CompetitionQuestionsVO_';
import type { BaseResponse_int_ } from '../models/BaseResponse_int_';
import type { BaseResponse_List_MyCompetitionVO_ } from '../models/BaseResponse_List_MyCompetitionVO_';
import type { BaseResponse_LoadCompetitionVO_ } from '../models/BaseResponse_LoadCompetitionVO_';
import type { ChartsDto } from '../models/ChartsDto';
import type { CompetitionAddRequest } from '../models/CompetitionAddRequest';
import type { CompetitionId } from '../models/CompetitionId';
import type { CompetitionQuestion } from '../models/CompetitionQuestion';
import type { QuestionCompetitionSubmit } from '../models/QuestionCompetitionSubmit';
import type { QuestionSubmitAddRequest } from '../models/QuestionSubmitAddRequest';
import type { SizeRequest } from '../models/SizeRequest';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class CompetitionControllerService {

    /**
     * doSubmitCompetitionQuestion
     * @param questionSubmitAddRequest questionSubmitAddRequest
     * @returns BaseResponse_boolean_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static doSubmitCompetitionQuestionUsingPost(
questionSubmitAddRequest: QuestionSubmitAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/competition/competition/doSubmitCompetitionQuestion',
            body: questionSubmitAddRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * getCharts
     * @param chartsDto chartsDto
     * @returns BaseResponse_ChartsListVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static getChartsUsingPost(
chartsDto: ChartsDto,
): CancelablePromise<BaseResponse_ChartsListVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/competition/competition/get/charts',
            body: chartsDto,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * getCompetitionQuestionById
     * @param questionId questionId
     * @returns CompetitionQuestion OK
     * @throws ApiError
     */
    public static getCompetitionQuestionByIdUsingGet(
questionId: number,
): CancelablePromise<CompetitionQuestion> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/competition/competition/get/id',
            query: {
                'questionId': questionId,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * getCompetitionQuestion
     * @param competitionId competitionId
     * @returns BaseResponse_CompetitionQuestionsVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static getCompetitionQuestionUsingPost(
competitionId: CompetitionId,
): CancelablePromise<BaseResponse_CompetitionQuestionsVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/competition/competition/getCompetitionQuestion',
            body: competitionId,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * getQuestionDetail
     * @param competitionId competitionId
     * @returns BaseResponse_CompetitionQuestionDetailVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static getQuestionDetailUsingPost(
competitionId: CompetitionId,
): CancelablePromise<BaseResponse_CompetitionQuestionDetailVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/competition/competition/getQuestionDetail',
            body: competitionId,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * loadCompetition
     * @param sizeRequest sizeRequest
     * @returns BaseResponse_LoadCompetitionVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static loadCompetitionUsingPost(
sizeRequest: SizeRequest,
): CancelablePromise<BaseResponse_LoadCompetitionVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/competition/competition/loadCompetition',
            body: sizeRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * loadCreatedCompetition
     * @returns BaseResponse_List_MyCompetitionVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static loadCreatedCompetitionUsingPost(): CancelablePromise<BaseResponse_List_MyCompetitionVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/competition/competition/loadCreatedCompetition',
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * loadParticipatedCompetition
     * @returns BaseResponse_List_MyCompetitionVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static loadParticipatedCompetitionUsingPost(): CancelablePromise<BaseResponse_List_MyCompetitionVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/competition/competition/loadParticipatedCompetition',
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * loadRegisterCount
     * @param competitionId competitionId
     * @returns BaseResponse_int_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static loadRegisterCountUsingPost(
competitionId: CompetitionId,
): CancelablePromise<BaseResponse_int_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/competition/competition/loadRegisterCount',
            body: competitionId,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * publish
     * @param competitionAddRequest competitionAddRequest
     * @returns BaseResponse_boolean_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static publishUsingPost(
competitionAddRequest: CompetitionAddRequest,
): CancelablePromise<BaseResponse_boolean_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/competition/competition/publish',
            body: competitionAddRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * publishCompetitionQuestion
     * @param competitionId competitionId
     * @returns BaseResponse_boolean_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static publishCompetitionQuestionUsingPost(
competitionId: CompetitionId,
): CancelablePromise<BaseResponse_boolean_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/competition/competition/publishCompetitionQuestion',
            body: competitionId,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * getSubmitQuestionById
     * @param questionId questionId
     * @returns QuestionCompetitionSubmit OK
     * @throws ApiError
     */
    public static getSubmitQuestionByIdUsingGet(
questionId: number,
): CancelablePromise<QuestionCompetitionSubmit> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/competition/competition/question_submit/get/id',
            query: {
                'questionId': questionId,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * updateQuestionSubmitById
     * @param questionSubmit questionSubmit
     * @returns boolean OK
     * @returns any Created
     * @throws ApiError
     */
    public static updateQuestionSubmitByIdUsingPost(
questionSubmit: QuestionCompetitionSubmit,
): CancelablePromise<boolean | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/competition/competition/question_submit/update',
            body: questionSubmit,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * registerCompetition
     * @param competitionId competitionId
     * @returns BaseResponse_boolean_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static registerCompetitionUsingPost(
competitionId: CompetitionId,
): CancelablePromise<BaseResponse_boolean_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/competition/competition/register',
            body: competitionId,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

}
